/**
* Copyright (c) 2004-2013 Luciano Xumerle. All rights reserved.
*
* This file is part of gephinfo.
*
* gephinfo is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
**/

package it.ciano.util;

/**
 * A class to manage CGI and HTML information.
 * 
 * @author Luciano Xumerle
 * @version 0.0.1
 */
final public class CGI
{

    /**
     * The default HTTP header.
     * <br>
     * <i>Content-Type: text/html; charset=ISO-8859-1</i>.
     */
    final public static String HTTPheader =
        "Content-Type: text/html; charset=ISO-8859-1";

    /**
     * The XML DOCTYPE.
     * <br>
     * It is <i>HTML 4.01 Transitional</i>.
     */
    final public static String DocType =
        "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">";

    /**
     * Returns an HTML header.
     * 
     * @param title header title.
     * @return HTML header String.
     */
    public static String getHEAD ( String title )
    {
        return DocType + "\n" + "<html><head><title>"
                + title + "</title></head>\n<body>\n";
    }

    /**
     * Closes the BODY and the HTML tag.
     * 
     * @return the String.
     */
    public static String getTAIL()
    {
        return "</body>\n</html>\n";
    }

    /**
     * Returns the HTML break line.
     * 
     * @return the String.
     */
    public static String br()
    {
        return "<br />\n";
    }

    /**
     * Returns the HR line.
     * 
     * @return the String.
     */
    public static String hr()
    {
        return hr( "" );
    }

    /**
     * Returns the HR line with the CSS info.
     * 
     * @param css the CSS String.
     * @return the String.
     */
    public static String hr( String css )
    {
        return "<hr " + css + " />\n";
    }



} // CLOSE CLASS

